package com.xpec.cipher;

import java.net.SocketAddress;

import org.jboss.netty.buffer.ChannelBuffer;

/**
 * CipherHandler 處理的抽象訊息
 */
public interface CipherHandler
{
	public static final int PASS_MESSAGE_SEND = 0;
	
	public static final int PASS_MESSAGE_RECEIVE = 1;

	
	
	public void sendData(ChannelBuffer buffer, SocketAddress socketAddress, boolean isFutureConcern);

	public void sendData(ChannelBuffer buffer, boolean isFutureConcern);
	
	public int getRealContentRemain();

	public void readByteFromRealContent(byte[] data);

	public int readUnsignedByteFromRealContent();

	public void setParameter(Integer key, Object value);

	public Object getParameter(Integer key);
	
	public void passMessage(int passAction);
	
	
	
	public void passMessage(ChannelBuffer data, SocketAddress socketAddress, int passAction);
	
	public void passMessage(ChannelBuffer data, int passAction);

	
	public ChannelBuffer getPacketContent();
	
	/**
	 * 通知外部 Cipher 握手已經成功
	 */
	public void notifyCipherFinished();
	
	
}
